package com.example.demo.commom;


import com.example.demo.entity.process.Grades;
import com.example.demo.entity.vo.GradesVO;

import java.util.List;

public class AvgScore {
    public static Double avgScore(List<Grades> grades){
        Double scores = 0.0;
        for(Grades grade : grades){
            scores += grade.getScore();
        }
        return scores / grades.size();
    }

    public static Double avgScore2(List<GradesVO> grades){
        Double scores = 0.0;
        for(GradesVO grade : grades){
            scores += grade.getScore();
        }
        return scores / grades.size();
    }
}
